{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hello World !!\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "### コンパイル\n",
    "javac HelloWorld.java\n",
    "\n",
    "### 実行\n",
    "java HelloWorld"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "public class HelloWorld {\n",
      "  public static void main (String[] args) {\n",
      "    System.out.println(\"Hello World !!\");\n",
      "  }\n",
      "}\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "### ソースの確認\n",
    "cat HelloWorld.java"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "public class HelloWorld {\n",
      "  public static void main (String[] args) {\n",
      "    System.out.println(\"Hello Java !!\");\n",
      "  }\n",
      "}\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "### ソースの編集\n",
    "cat <<- EOS > HelloWorld.java\n",
    "public class HelloWorld {\n",
    "  public static void main (String[] args) {\n",
    "    System.out.println(\"Hello Java !!\");\n",
    "  }\n",
    "}\n",
    "EOS\n",
    "\n",
    "### ソースの確認\n",
    "cat HelloWorld.java"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hello Java !!\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "### コンパイル\n",
    "javac HelloWorld.java\n",
    "\n",
    "### 実行\n",
    "java HelloWorld"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
